package com.yitong.main.config;

import com.yitong.spiboot.entity.Yplugin;
import com.yitong.spiboot.entity.YpluginProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.rest.core.config.RepositoryRestConfiguration;
import org.springframework.data.rest.webmvc.config.RepositoryRestConfigurer;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.config.annotation.CorsRegistry;

@Component
@Configuration
public class RepositoryConfig implements RepositoryRestConfigurer {
    @Override
    public void configureRepositoryRestConfiguration(RepositoryRestConfiguration config,CorsRegistry cors) {
        config.exposeIdsFor( Yplugin.class);
        config.exposeIdsFor( YpluginProperties.class);

    }
}